﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;

namespace Woodbase.CodeBase.Utils
{
    public class Serializing
    {
        public static string serialize(object o)
        {
            JavaScriptSerializer oSerializer = new JavaScriptSerializer();
            string s = "";
            s = oSerializer.Serialize(o);
            s = s.Replace(@"\""", @"\\""");
            s = s.Replace(@"\n", "");
            return s;
        }
    }
}
